<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <!-- Page title -->
    <title>中风医馆 | 店铺管理</title>

    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
    <!--<link rel="shortcut icon" type="image/ico" href="favicon.ico" />-->

    <!-- Vendor styles -->
    <link rel="stylesheet" href="__PUBLIC__/vendor/fontawesome/css/font-awesome.css" />
    <link rel="stylesheet" href="__PUBLIC__/vendor/metisMenu/dist/metisMenu.css" />
    <link rel="stylesheet" href="__PUBLIC__/vendor/animate.css/animate.css" />
    <link rel="stylesheet" href="__PUBLIC__/vendor/bootstrap/dist/css/bootstrap.css" />
    <link rel="stylesheet" href="__PUBLIC__/vendor/sweetalert/lib/sweet-alert.css" />

    <!-- App styles -->
    <link rel="stylesheet" href="__PUBLIC__/fonts/pe-icon-7-stroke/css/pe-icon-7-stroke.css" />
    <link rel="stylesheet" href="__PUBLIC__/fonts/pe-icon-7-stroke/css/helper.css" />
    <link rel="stylesheet" href="__PUBLIC__/styles/style.css">
</head>
<body>

<!-- Simple splash screen-->
<div class="splash"> 
	<div class="color-line">
		
	</div>
	<div class="splash-title">
		<h1>中风医馆服务者后台</h1>
		<p>中风医馆-您的家庭医生，离你最近的医馆</p>
		<img src="__PUBLIC__/images/loading-bars.svg" width="64" height="64" /> 
	</div> 
</div>
<!--[if lt IE 7]>
<p class="alert alert-danger">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->

<!-- Header -->
<div id="header">
    <div class="color-line">
    </div>
    <div id="logo" class="light-version">
        <span>
            中风医馆-您的家庭医生
        </span>
    </div>
    <nav role="navigation">
        <div class="header-link hide-menu"><i class="fa fa-bars"></i></div>
        <div class="small-logo">
            <span class="text-primary">中风医馆</span>
        </div>
        <form role="search" class="navbar-form-custom" method="post" action="#">
            <div class="form-group">
                <input type="text" placeholder="搜索" class="form-control" name="search">
            </div>
        </form>
        <div class="navbar-right">
            <ul class="nav navbar-nav no-borders">
                <!--<li class="dropdown">
                    <a class="dropdown-toggle" href="#" data-toggle="dropdown">
                        <i class="pe-7s-speaker"></i>
                    </a>
                    <ul class="dropdown-menu hdropdown notification animated flipInX">
                        <li>
                            <a>
                                <span class="label label-success">NEW</span> It is a long established.
                            </a>
                        </li>
                        <li>
                            <a>
                                <span class="label label-warning">WAR</span> There are many variations.
                            </a>
                        </li>
                        <li>
                            <a>
                                <span class="label label-danger">ERR</span> Contrary to popular belief.
                            </a>
                        </li>
                        <li class="summary"><a href="#">See all notifications</a></li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a class="dropdown-toggle label-menu-corner" href="#" data-toggle="dropdown">
                        <i class="pe-7s-mail"></i>
                        <span class="label label-success">4</span>
                    </a>
                    <ul class="dropdown-menu hdropdown animated flipInX">
                        <div class="title">
                            You have 4 new messages
                        </div>
                        <li>
                            <a>
                                It is a long established.
                            </a>
                        </li>
                        <li>
                            <a>
                                There are many variations.
                            </a>
                        </li>
                        <li>
                            <a>
                                Lorem Ipsum is simply dummy.
                            </a>
                        </li>
                        <li>
                            <a>
                                Contrary to popular belief.
                            </a>
                        </li>
                        <li class="summary"><a href="#">See All Messages</a></li>
                    </ul>
                </li>-->
                <li class="dropdown">
                    <a href="{:U('Register/logout')}">
                        <i class="pe-7s-upload pe-rotate-90"></i>
                    </a>
                </li>
            </ul>
        </div>
    </nav>
</div>

<!-- Navigation -->
<aside id="menu">
    <div id="navigation">
        <div class="profile-picture">
            <a href="">
                <img src="{$headurl}" width="76px" height="76px" class="img-circle m-b" alt="logo">
            </a>

            <div class="stats-label text-color">
                <span class="font-extra-bold font-uppercase">{$username}</span>

                <div class="dropdown">
                    <a class="dropdown-toggle" href="#" data-toggle="dropdown">
                        <small class="text-muted">快捷入口<b class="caret"></b></small>
                    </a>
                    <ul class="dropdown-menu animated fadeInRight m-t-xs">
                        <!--<li><a href="contacts.html">Contacts</a></li>
                        <li><a href="profile.html">Profile</a></li>
                        <li><a href="analytics.html">Analytics</a></li>
                        <li class="divider"></li>-->
                        <li><a href="{:U('Register/logout')}">退出系统</a></li>
                    </ul>
                </div>


                <div id="sparkline1" class="small-chart m-t-sm"></div>
                <div>
                    <!--<h4 class="font-extra-bold m-b-xs">
                        $260 104,200
                    </h4>-->
                    <small class="text-muted">中风医馆-离您最近的医馆</small>
                </div>
            </div>
        </div>

        <ul class="nav" id="side-menu">
            <!--<li>
                <a href="index.html"> <span class="nav-label">首页</span> <span class="label label-success pull-right">v.1</span> </a>
            </li>-->
            <li>
                <a href="{:U('certification')}"> <span class="nav-label">医生认证</span><span class="label label-warning pull-right">NEW</span> </a>
            </li>
            <li>
                <a href="{:U('certificationClinic')}"> <span class="nav-label">诊所认证</span><span class="label label-warning pull-right">NEW</span> </a>
            </li>
            <!--<li>
                <a href="order.html"> <span class="nav-label">订单管理</span></a>
            </li>
            <li>
                <a href="ShopManager.html"> <span class="nav-label">套餐管理</span></a>
            </li>-->
        </ul>
    </div>
</aside>

<!-- Main Wrapper -->
<div id="wrapper">

    <div class="normalheader transition animated fadeIn">
    <div class="hpanel">
        <div class="panel-body">
            <a class="small-header-action" href="">
                <div class="clip-header">
                    <i class="fa fa-arrow-up"></i>
                </div>
            </a>

            <div id="hbreadcrumb" class="pull-right m-t-lg">
                <ol class="hbreadcrumb breadcrumb">
                    <li><a href="index.html">中风医馆</a></li>
                    <li class="active">
                        <span>诊所认证</span>
                    </li>
                </ol>
            </div>
            <h2 class="font-light m-b-xs">
                诊所认证
            </h2>
            <small>认证通过后即可开启服务</small>
        </div>
    </div>
    <eq name='status' value='fail'>
        <div class="hpanel hred">
            <div class="panel-heading">
                <div class="panel-tools">
                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                    <a class="closebox"><i class="fa fa-times"></i></a>
                </div>
                    温馨提醒
            </div>
            <div class="panel-body">
                <h3>抱歉！您尚未通过核审</h3>
                <h4 style="color: red;">原因<span>XXX</span></h4>
            </div>
        </div>
    </eq>
</div>

	<div class="content animate-panel" data-delay="0.01">

        <!--诊所认证-->
        <div id="agencyCertif" class="row" style="">
        <div class="col-lg-12">
            <div class="hpanel">
                <div class="panel-heading">
                    <div class="panel-tools">
                        <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                        <a class="closebox"><i class="fa fa-times"></i></a>
                    </div>
                    Example fo wizard form
                </div>
                <div class="panel-body">

                    <form name="simpleForm" enctype="multipart/form-data" novalidate id="simpleForm" action="{:U('certificationClinic')}" method="post">

                        <div class="text-center m-b-md" id="wizardControl">

                            <a class="btn btn-primary" href="#agencystep1" data-toggle="tab">Step 1 - 个人资料</a>
                            <a class="btn btn-default" href="#agencystep2" data-toggle="tab">Step 2 - 资质信息</a>
                            <a class="btn btn-default" href="#agencystep3" data-toggle="tab">Step 3 - 接收协议</a>

                        </div>

                        <div class="tab-content">
                        <div id="agencystep1" class="p-m tab-pane active">

                            <div class="row">
                                <div class="col-lg-3 text-center">
                                    <i class="pe-7s-user fa-5x text-muted"></i>
                                    <p class="small m-t-md">
                                        <strong>Lorem Ipsum</strong> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard.
                                        <br/><br/>Lorem Ipsum has been the industry's dummy text of the printing and typesetting
                                    </p>
                                </div>
                                <div class="col-lg-9">
                                    <div class="row">
                                        <div class="form-group col-lg-6">
                                            <label>*诊所名称</label>
                                            <input type="text" value="" class="form-control" name="name" placeholder="请填写诊所名称">
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label>*电话</label>
                                            <input type="text" value="" class="form-control" name="phone" placeholder="请填写一个诊所电话">
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label>微信</label>
                                            <input type="text" value="" class="form-control" name="wechat" placeholder="请填写一个诊所电话">
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label>电子邮箱</label>
                                            <input type="text" value="" class="form-control" name="email" placeholder="请填写一个有效邮箱" >
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label>选择服务地区</label>
											<select class="form-control" name="area_id">
                                                <option value="">请选择...</option>
                                                <foreach name="ares" item="row">
                                                    <option value="{$row.id}">{$row.title}</option>
                                                </foreach>
                                            </select>
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label>诊所详细地址</label>
											<input type="text" value="" class="form-control" name="serverdetail" placeholder="请填写诊所详细地址" >
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label>诊所简介</label>
                                            <textarea  class="form-control" name="content" placeholder="200字以内" rows="6"></textarea>
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label>技能标签（如：针灸,推拿等）</label>
											<input type="text" value="" class="form-control" name="skill" placeholder="多项请用逗号‘，’隔开" >
                                        </div>
                                        <div class="form-group col-lg-3">
                                            <label>诊所头像</label><br />
                                            <a href="javascript:void(0);"  class="add-pic-pre"><input type="file" name="head_img" accept=".jpg,.png"/><img style="border-radius: 50%" class="credit" src=""/></a>
                                            <p>1.2M以内，JPG/PNG格式的图片</p>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="text-right m-t-xs">
                                <a class="btn btn-default next" href="#">下一步</a>
                            </div>

                        </div>

                        <div id="agencystep2" class="step2 p-m tab-pane">

                            <div class="row">
                                <div class="col-lg-3 text-center">
                                    <i class="pe-7s-credit fa-5x text-muted"></i>
                                    <p class="small m-t-md">
                                        <strong>It is a long</strong> established fact that a reader will be distracted by the readable
                                        <br/><br/>Many desktop publishing packages and web page editors now use
                                    </p>
                                </div>
                                <div class="col-lg-9">
                                    <div class="row" >
                                        <div class="form-group col-lg-6">
                                            <label>公司全称</label>
                                            <input type="" value="" id="" class="form-control" name="big_name" placeholder="请填写与营业执照一致的合法公司全称" >
                                        </div>
                                        <div class="form-group col-lg-6">
                                            <label>营业执照注册号</label>
                                            <input type="" value="" id="" class="form-control" name="licence_no" placeholder="请填写完整的营业执照上的注册号" >
                                        </div>
                                        <div class="form-group col-lg-12">
                                            <label>营业执照照片</label><br />
                                            <a href="javascript:void(0);"  class="add-pic-pre"><input type="file" name="commpy_img" accept=".jpg,.png"/><img class="credit" src=""/></a>
                                        	<div style="display: inline-block;">
                                        		<p>1.2M以内，JPG/PNG格式的图片</p>
	                                        	<p>2.执照信息清晰无遮挡</p>
	                                        	<p>3.我司资质验证系统已与工商部门联网，请勿提供虚假证件</p>
                                        	</div>                                      	
                                        </div>
                                        <div class="form-group col-lg-3">
                                            <label>营业员身份证正面</label><br />
                                            <a href="javascript:void(0);"  class="add-pic-pre"><input type="file" name="id_img_z" accept=".jpg,.png"/><img class="credit" src=""/></a>
                                        </div>
                                        <div class="form-group col-lg-3">
                                            <label>营业员身份证反面</label><br />
                                            <a href="javascript:void(0);"  class="add-pic-pre"><input type="file" name="id_img_f" accept=".jpg,.png"/><img class="credit" src=""/></a>
                                        </div>
                                        <div style="display: inline-block;">
                                            <p>1.2M以内，JPG/PNG格式的图片</p>
                                            <p>2.身份证件需上传<b style="color: red;">正反面</b>，证件信息清晰无遮挡</p>
                                            <p>3.我司资质验证系统已与工商部门联网，请勿提供虚假证件</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="text-right m-t-xs">
                                <a class="btn btn-default prev" href="#">上一步</a>
                                <a class="btn btn-default next" href="#">下一步</a>
                            </div>

                        </div>
                        <div id="agencystep3" class="tab-pane">
                            <div class="row text-center m-t-lg m-b-lg">
                                <div class="col-lg-12">
                                    <i class="pe-7s-check fa-5x text-muted"></i>
                                    <p class="small m-t-md">
                                        	请仔细阅读<b><a href="" data-toggle="modal" data-target="#myModal">中风医馆开店协议</a></b>，点击提交后表示已接收所有条款
                                    </p>
                                </div>
                                <div class="checkbox col-lg-12">
                                    <input id="accept" checked="checked" type="checkbox" class="i-checks approveCheck" name="approve">
                                   				 接收此协议
                                </div>
                            </div>
                            <div class="text-right m-t-xs">
                                <a class="btn btn-default prev" href="#">上一步</a>
                                <input type="submit" class="btn btn-success submitWizard" value="提交">
                            </div>
                        </div>
                        </div>
                    </form>

                    <div class="m-t-md">

                        <!--<p>-->
                            <!--This is an example of a wizard form which can be easy adjusted. Since each step is a tab, and each clik to next tab is a function you can easily add validation or any other functionality.-->
                        <!--</p>-->

                    </div>

                </div>
            </div>
        </div>

    </div>
        <!--诊所认证完-->
    </div>

</div>

<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">
					中风医馆开店协议
				</h4>
			</div>
			<div class="modal-body">
				在这里添加一些文本
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭
				</button>
				<button type="button" id="acceptprotocol" class="btn btn-primary">
					接收协议
				</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>


<!-- Vendor scripts -->
<script src="__PUBLIC__/vendor/jquery/dist/jquery.min.js"></script>
<script src="__PUBLIC__/vendor/jquery-ui/jquery-ui.min.js"></script>
<script src="__PUBLIC__/vendor/slimScroll/jquery.slimscroll.min.js"></script>
<script src="__PUBLIC__/vendor/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/vendor/metisMenu/dist/metisMenu.min.js"></script>
<script src="__PUBLIC__/vendor/iCheck/icheck.min.js"></script>
<script src="__PUBLIC__/vendor/sparkline/index.js"></script>
<script src="__PUBLIC__/vendor/sweetalert/lib/sweet-alert.min.js"></script>

<!-- App scripts -->
<script src="__PUBLIC__/scripts/homer.js"></script>

<script>

        $('#groupname').focus(function () {
            setInterval(function () {
                var groupId = $('#groupname').val();
                $.getJSON("{:U('Index/validateGroup')}",{groupId:groupId},function (response) {
                    if(response.label){
                        $('#groupname-msg').html('您要加入的团队为：<b>'+response.name+'</b>');
                        $('#groupname-msg').css('color','green')
                    }else {
                        $('#groupname-msg').html('没有找到您要加入的团队');
                        $('#groupname-msg').css('color','red')
                    }
                });
            },1000);
        });

        $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
            $('a[data-toggle="tab"]').removeClass('btn-primary');
            $('a[data-toggle="tab"]').addClass('btn-default');
            $(this).removeClass('btn-default');
            $(this).addClass('btn-primary');
        })

        $('.next').click(function(){
            var nextId = $(this).parents('.tab-pane').next().attr("id");
            $('[href=#'+nextId+']').tab('show');
        })

        $('.prev').click(function(){
            var prevId = $(this).parents('.tab-pane').prev().attr("id");
            $('[href=#'+prevId+']').tab('show');
        })

//        $('.submitWizard').click(function(){
//
//            var approve = $(".approveCheck").is(':checked');
//            if(approve) {
////                 Got to step 1
////              $('[href=#step1]').tab('show');
////
////                 Serialize data to post method
////                var datastring = $("#simpleForm").serialize();
//
//                // Show notification
//                swal({
//                    title: "恭喜!",
//                    text: "上传资料成功，请等待核审!",
//                    type: "success"
//                },function(){
//                	location.href = "Certification_wait.html";
//                });
//
////            Example code for post form
////            $.ajax({
////                type: "POST",
////                url: "your_link.php",
////                data: datastring,
////                success: function(data) {
////                    // Notification
////                }
////            });
//            } else {
////                 Show notification
//                swal({
//                    title: "失败!",
//                    text: "请阅读并接收开店协议",
//                    type: "error"
//                });
//            }
//        })
    

    $(".uploadimg").find("input[type=file]").change(function(){
		var imgFile = this.files[0];
	    var fr = new FileReader();
	    var img = $(this).parent().siblings('img');
	    fr.onload = function() {
	        img.attr("src",fr.result);
	    };
	    fr.readAsDataURL(imgFile);
	})
    
    
    $(".jineng>span").click(function(){
//		if($('.jinengadd>span').length == 5){
//			alert('最多选择五个')
//		}else{
//			if($(this).hasClass('cornflowerblue')){
//				$(this).removeClass('cornflowerblue');
//			}else{
//				$(this).addClass('cornflowerblue');
//			}
//			var dom = '<span>'+$(this).text()+'</span>';
//  		$('.jinengadd').append(dom);
//		}
		
		if($(this).hasClass('cornflowerblue')){
			$(this).removeClass('cornflowerblue');
            var nowvalue = $(this).text();
            $("input[value='"+nowvalue+"']").remove();
		}else{
			if($('span.cornflowerblue').length == 5){
				alert('最多选择五个')
			}else{
			    $('#skill-span').append("<input name='skill[]' type='hidden' value='"+$(this).text()+"'>");
				$(this).addClass('cornflowerblue');
			}			
		}
    })
    
    $('#jinengtuadd').click(function(){
    	if($('.jntu>.add-pic-pre').length == 5){
    		alert('最多添加5个');
    	}else{
    		var dom1 = '<a href="javascript:void(0);"  class="add-pic-pre">'+
                        	'<input type="file" name="img_skill[]" accept=".jpg,.png"/>'+
                        	'<img class="credit" src=""/>'+
                        '</a>';
    		$('.jntu').append(dom1);
    		$(".add-pic-pre").children("input").change(function(){
				var imgFile = this.files[0];
			    var fr = new FileReader();
			    var img = $(this).next(".credit");
			    fr.onload = function() {
			        img.attr("src",fr.result);
			    };
			    fr.readAsDataURL(imgFile);
			})
    	}
    })
    
    $(".add-pic-pre").children("input").change(function(){
		var imgFile = this.files[0];
	    var fr = new FileReader();
	    var img = $(this).next(".credit");
	    fr.onload = function() {
	        img.attr("src",fr.result);
	    };
	    fr.readAsDataURL(imgFile);
	})
    
    $("#acceptprotocol").click(function(){
    	$(".icheckbox_square-green").addClass("checked");
    	$(".approveCheck").attr("checked",true);
    	$('#myModal').modal('hide');
    })
    
    $(".person").click(function(){
    	$("#choose").hide();
		$("#personCertif").show();
	})
    $(".agency").click(function(){
    	$("#choose").hide();
		$("#agencyCertif").show();
	})
     $(".group").click(function(){
    	$("#choose").hide();
		$("#groupCertif").show();
	})
    $("#personCertif").find("#personstep1").find(".prev").click(function(){
    	$("#personCertif").hide();
    	$("#choose").show();		
    })
    $("#agencyCertif").find("#agencystep1").find(".prev").click(function(){
    	$("#agencyCertif").hide();
    	$("#choose").show();		
    })
    $("#groupCertif").find("#personstep1").find(".prev").click(function(){
    	$("#groupCertif").hide();
    	$("#choose").show();		
    })
</script>

</body>
</html>